<!doctype html>
<html>
{include file="head.html"}

<body>

<div class="body">
<div class="header" > <a href="{$appshop}?m=coupon"  class="left-btn"><span class="iconfont icon-back"></span></a>
    <div class="title">优惠券编辑</div>
    
  </div>
    <form method='post' action='{$appshop}?m=coupon&a=save'>
    <input type="hidden" name="type_id" value="4">
      <input type='hidden' name='id' style='display:none;' value='{$data.id}' >
      <table class='table table-bordered' width='100%'>
        <tr>
          <td width="100">名称：</td>
          <td><input type='text' name='title' id='title' value='{$data.title}' ></td>
        </tr>
         
        <tr>
          <td>抵消价格：</td>
          <td><input type='text' name='money' id='money'    value='{$data.money}' ></td>
        </tr>
        
        <tr>
          <td>最低消费价格：</td>
          <td><input type='text' name='lower_money' id='lower_money'    value='{$data.lower_money}' ></td>
        </tr>
         <tr>
        	<td>限制次数</td>
            <td>
            	<input type="text" name="limit_num" value="{if !$data.limit_num}1{else}{$data.limit_num}{/if}"> (用户可以领取次数)
            </td>
        </tr>
        <tr>
          <td>总数量：</td>
          <td><input type='text' name='amount' id='amount'   value='{$data.amount}' ></td>
        </tr>
        <tr>
          <td>领取数量：</td>
          <td>{$data.get_num}</td>
        </tr>
        
        <tr>
          <td>使用数量：</td>
          <td>{$data.use_num}</td>
        </tr>
        <tr>
              <td>图片：</td>
              <td> <div id="up1" url="/index.php?m=upload&a=uploadtao&dir=shop_product&id={$data.id}">
    	<div class="btn-upload">
          <input type="file" name="upimg" id="ud"  class="btn-upload-file" onChange="uploadimg('up1')">
         </div>
 
          <input type="hidden" name="imgurl" class="imgurl" value="{$data.imgurl}">
          <span class="imgShow">
          {if $data.imgurl}
          <img src="{$data.imgurl|images_site}.100x100.jpg">
          {/if}
          </span>
      </div></td>
            </tr>
        
        <tr>
          <td>截止日期：</td>
          <td><input type='text' name='end_time' id='end_time'   value='{if $data}{$data.end_time|date:Y-m-d H:i:s}{/if}'  onClick="WdatePicker({startDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd HH:mm'})" ></td>
        </tr>
        {if $data}
        <tr>
          <td>创建时间：</td>
          <td>{$data.dateline|date:Y-m-d H:m}</td>
        </tr>
        {/if}
        <tr>
          <td>状态：</td>
          <td><input type='radio' name='status' id='status' value='1' {if $data.status eq 1} checked="checked" {/if} >
            显示
            <input type='radio' name='status' id='status' value='0' {if $data.status neq 1} checked="checked" {/if}>
            隐藏 </td>
        </tr>
        
        
        
        <tr>
          <td></td>
          <td><input type='submit' value='保存' class='btn btn-success'></td>
        </tr>
      </table>
    </form>
  </div>
</div>
<script language="javascript" src="/plugin/My97DatePicker/WdatePicker.js"></script>
<script src="/plugin/skyweb/lrz.mobile.min.js"></script>
<script src="/static/js/upload_wap.js"></script>
<script language="javascript">

$(document).ready(function(e) {
    $("#amount").bind("keyup",function(){
		$("#total_money").html($(this).val());
	});
});

</script>
{include file="footer.html"}